#!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""
@Project : gtmsAutoTestProject 
@File    : pos_device_update_status_interface.py
@IDE     : PyCharm 
@Author  : Mario
@Date    : 2022/5/7 11:07 
@Describe: POS绑定品牌切换
"""
from fastapi import APIRouter
from FastApi.server.middle.setup.pos.pos_device_update_status_server import pos_device_update_status
from FastApi.dto.middle.setupDto.pos.pos_device_update_status_dto import PosDeviceUpdateStatusDtoModel
from Comm.logUtils.logControl import LogHandler

logger = LogHandler().get_logger()
posDeviceUpdateStatus_router = APIRouter()


@posDeviceUpdateStatus_router.post("/device/brand/switch", name="POS设备绑定品牌切换")
async def posDeviceUpdateStatus(payload: PosDeviceUpdateStatusDtoModel):
    logger.info('请求参数:[{}]'.format(payload))
    response_data = pos_device_update_status(payload.environment, payload.switchBrandCode, payload.deviceMac)
    logger.info('接口响应:[{}]'.format(response_data))
    return response_data
